package com.ruoyi.project.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.mapper.AssetHouseMapper;
import com.ruoyi.project.domain.AssetHouse;
import com.ruoyi.project.service.IAssetHouseService;

/**
 * 房产资产信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-05-15
 */
@Service
public class AssetHouseServiceImpl implements IAssetHouseService 
{
    @Autowired
    private AssetHouseMapper assetHouseMapper;

    /**
     * 查询房产资产信息
     * 
     * @param houseId 房产资产信息主键
     * @return 房产资产信息
     */
    @Override
    public AssetHouse selectAssetHouseByHouseId(Long houseId)
    {
        return assetHouseMapper.selectAssetHouseByHouseId(houseId);
    }

    /**
     * 查询房产资产信息列表
     * 
     * @param assetHouse 房产资产信息
     * @return 房产资产信息
     */
    @Override
    public List<AssetHouse> selectAssetHouseList(AssetHouse assetHouse)
    {
        return assetHouseMapper.selectAssetHouseList(assetHouse);
    }

    /**
     * 新增房产资产信息
     * 
     * @param assetHouse 房产资产信息
     * @return 结果
     */
    @Override
    public int insertAssetHouse(AssetHouse assetHouse)
    {
        assetHouse.setCreateTime(DateUtils.getNowDate());
        return assetHouseMapper.insertAssetHouse(assetHouse);
    }

    /**
     * 修改房产资产信息
     * 
     * @param assetHouse 房产资产信息
     * @return 结果
     */
    @Override
    public int updateAssetHouse(AssetHouse assetHouse)
    {
        assetHouse.setUpdateTime(DateUtils.getNowDate());
        return assetHouseMapper.updateAssetHouse(assetHouse);
    }

    /**
     * 批量删除房产资产信息
     * 
     * @param houseIds 需要删除的房产资产信息主键
     * @return 结果
     */
    @Override
    public int deleteAssetHouseByHouseIds(Long[] houseIds)
    {
        return assetHouseMapper.deleteAssetHouseByHouseIds(houseIds);
    }

    /**
     * 删除房产资产信息信息
     * 
     * @param houseId 房产资产信息主键
     * @return 结果
     */
    @Override
    public int deleteAssetHouseByHouseId(Long houseId)
    {
        return assetHouseMapper.deleteAssetHouseByHouseId(houseId);
    }
}
